﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebApi.Common
{
    /// <summary>
    /// 视频格式管理类
    /// </summary>
    public class VideoFormatMgr
    {
        private static List<string> videoSuffixList = new List<string>() {
            "flv", "avi", "wmv", "asf", "wmvhd", "dat", "vob", "mpg", "mpeg"
        ,"mp4","3gp","3g2","mkv","rm","rmvb","mov","qt","ogg","ogv","mod"};
        public static bool IsVideo(string fileName)
        {
            string suffix = System.IO.Path.GetExtension(fileName).ToLower();
            if (videoSuffixList.Contains(suffix.Trim('.')))
            {
                return true;
            }
            else
            {
                return false;
            }

        }

    }
}
